package old_go_learn

import (
	"net"
	"fmt"
)

func main(){
	// 自动连接服务器

	conn,err := net.Dial("tcp","127.0.0.1:8000")
	if err != nil{
		fmt.Println("err = ",err)
		return
	}

	defer conn.Close()

	//发送数据
	conn.Write([] byte ("are you ok"))

}
